import React from 'react';
import Button from './button';

const Item = (props) => {

  const { text, index, } = props;

  const onClickDeleteItem = () => {
    return index;
  };

  return (
    <div>
      <span>{ text }</span>
      <Button onClickDeleteItem={ onClickDeleteItem } />
    </div>
  );
};

export default Item;
